import 'package:flutter/material.dart';
import 'package:study_flutter/yzhg/project/shop/model/GoodsDetailBean.dart';

class GoodsDetailProvide with ChangeNotifier {
  GoodInfo goodInfo;
  List<GoodComments> goodComments = [];
  AdvertesPicture advertesPicture;

  /*  /*详情和评论切换  true(详情)  false(评论)*/*/
  bool detailCommentStatus = true;

  cutDetailComment(bool detailCommentStatus){
    this.detailCommentStatus = detailCommentStatus;
    notifyListeners();
  }


  /*获取商品信息*/
  getGoodInfo(GoodInfo goodInfo) {
    this.goodInfo = goodInfo;
    notifyListeners();
  }

  /*提取商品评论*/
  getGoodComments(List<GoodComments> goodComments) {
    this.goodComments.addAll(goodComments);
    notifyListeners();
  }

  /*通告*/
  getAdvertesPicture(AdvertesPicture advertesPicture) {
    this.advertesPicture = advertesPicture;
    notifyListeners();
  }
}
